package LeetCode;

import java.util.Scanner;

//
// Created by ✎﹏ℳ๓独赏☆独醉 on 2024/6/10.
// 
public class Excel表列名称 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        Excel表列名称 s = new Excel表列名称();
        System.out.println(s.convertToTitle(scan.nextInt()));
    }

    public String convertToTitle(int columnNumber) {
        if (columnNumber <= 0) {
            return "";
        }
        StringBuilder sb = new StringBuilder();
        while (columnNumber > 0) {
            columnNumber--;
            sb.append((char) (columnNumber % 26 + 'A'));
            columnNumber = columnNumber / 26;
        }
        return sb.reverse().toString();
    }
}
